<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>  
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>宽仁妇孺关怀PAC</title>

	<link rel="stylesheet" type="text/css" href="${pageContext.request.contextPath}/css/default.css" />
    <link rel="stylesheet" type="text/css" href="${pageContext.request.contextPath}/js/easyui/themes/default/easyui.css" />
    <link rel="stylesheet" type="text/css" href="${pageContext.request.contextPath}/js/easyui/themes/icon.css" />
    <script type="text/javascript" src="${pageContext.request.contextPath}/js/jquery.min.js"></script>
    <script type="text/javascript" src="${pageContext.request.contextPath}/js/easyui/jquery.easyui.min.js"></script>
    <script type="text/javascript" src="${pageContext.request.contextPath}/js/easyui/locale/easyui-lang-zh_CN.js"></script>
    <script type="text/javascript" src="${pageContext.request.contextPath}/js/easyui/extend/tabs.extend.js"></script>
    <script type="text/javascript" src='${pageContext.request.contextPath}/js/common/Date.js'> </script>
	<script type="text/javascript" src='${pageContext.request.contextPath}/js/page/pac.index.js'> </script>
	<script type="text/javascript" src='${pageContext.request.contextPath}/js/page/main/wxchat.js'> </script>
	<script type="text/javascript" src="${pageContext.request.contextPath}/js/page/user/userDetailList.js"></script>
	
	<script type="text/javascript">
	var _menus = {};
	
	//扩展验证方法
	$.extend($.fn.validatebox.defaults.rules, {
	    equalTo: { 
	    	validator: function (value, param) { 
	    		return $(param[0]).val() == value; 
	    		}, 
	    	message: '两次密码输入不一致' 
	    }
	});

    //关闭登录窗口
    function closePwd() {
        $('#winEditPwd').window('close');
    }

     $(function() {

         $('#editpass').click(function() {
             $('#winEditPwd').window('open');
         });

         $('#btnEp').click(function() {
             editPassword();
         });

		$('#btnCancel').click(function(){closePwd();});

         $('#loginOut').click(function() {
             $.messager.confirm('提示', '您确定要退出本次登录吗?', function(r) {

                 if (r) {
                     window.location.href="../login/exit";
                 }
             });
         });
         
        //设置今日时间
        var frameTodayD=new Date();
     	var frameTodayS=frameTodayD.format("yyyy-MM-dd");
     	$("#spaToday").html("今天："+frameTodayS);
     });
     
     
     
	</script>
	<style type="text/css">
	.userGridDiv{
		margin-bottom: 10px;
	}
	.patientSynopsis{
		margin: 5px;
	}
	.patientSynopsis div{
		display: inline-block;
	}
	.btnDateSel{
		cursor:pointer;
		background:#00BBFF;
		border-radius: 5px;
		padding: 5px 10px;
		border: 1px solid #ddd;
	}
	.btnDate{
		cursor:pointer;
		background: #EFEFEF;
		padding: 5px 10px;
		border-radius: 5px;
		border: 1px solid #efefef;
	}
	</style>
</head>
<body class="easyui-layout" style="overflow-y: hidden"  fit="true"   scroll="no">

<noscript>
<div style=" position:absolute; z-index:100000; height:2046px;top:0px;left:0px; width:100%; background:white; text-align:center;">
    <img src="../images/noscript.gif" alt='抱歉，请开启脚本支持！' />
</div>
</noscript>

<div id="loading-mask" style="position:absolute;top:0px; left:0px; width:100%; height:100%; background:#D2E0F2; z-index:20000">
<div id="pageloading" style="position:absolute; top:50%; left:50%; margin:-120px 0px 0px -120px; text-align:center;  border:2px solid #8DB2E3; width:200px; height:40px;  font-size:14px;padding:10px; font-weight:bold; background:#fff; color:#15428B;"> 
    <img src="../images/loading.gif" align="absmiddle" /> 正在加载中,请稍候...</div>
</div>

    <div region="north" split="true" border="false" style="overflow: hidden;height:41px;
        background: url(../images/layout-browser-hd-bg.gif) #7f99be repeat-x center 50%;
        line-height: 41px;color: #fff; font-family: Verdana, 微软雅黑,黑体";>
        <span style="float:right; padding-right:20px;" class="head">
        	欢迎您：
        	<c:choose>
        		<c:when test="${user.nickname != null }">
        			${user.nickname }
        		</c:when>
        		<c:otherwise>
        			${user.userName }
        		</c:otherwise>
        	</c:choose>
        	<a href="#" id="editpass">修改密码</a> 
        	<a href="#" id="loginOut">安全退出</a>
        	<input id="myHeadimg" type="hidden" value="${user.headImg }">
        	<input id="mainframe" type="hidden" value="1">
        </span>
        <span style="padding-left:3px;">
        	<img alt="logo" src="../images/logo_eu.png" height="35px" style="vertical-align:middle;margin-bottom: 10px;" >
        	<span style="font-size: 16px; ">宽仁妇孺关怀PAC</span>
        </span>
    </div>
    <div region="south" split="true" style="height: 30px; background: #D2E0F2; ">
        <div class="footer">
       	 重庆宽仁妇孺照护管理有限公司 网址：www.kalosy.com 
        </div>
    </div>
    <div region="west" split="true"  title="导航菜单" style="width:180px;" id="west">
		<div id="nav">
		<!--  导航内容 -->
		</div>
    </div>
    <div id="mainPanle" region="center" style="background: #eee; overflow-y:hidden;">
        <div id="tabs" class="easyui-tabs"  fit="true" border="false" >
			<div title="工作台" style="overflow:hidden; color:red; background-color: #f0f0f0;" >
			<div id="workplatform" style="height: 100%; overflow: auto;font-size:13px;background-position: right;background-repeat: no-repeat; " align=left>
			<div style="margin: 3px;">

			
			
			<div class="userGridDiv" style="width: 70%;float: left;">
			<!-- 未给出诊断 -->
			<div class="easyui-panel" title="未给出诊断患者" style="padding: 2px;">
			<div style="padding: 5px;margin: 5px; ">
				<input id="txtQd48" name="qd48" type="hidden" value="0">
				<span id="spaSelDate0" name="spaSelDate" onclick="selectMainframeByDate(0)" class="btnDateSel">今天</span>
				<span id="spaSelDate-1" name="spaSelDate" onclick="selectMainframeByDate(-1)" class="btnDate">昨天</span>
				<span id="spaSelDate-2" name="spaSelDate" onclick="selectMainframeByDate(-2)" class="btnDate">前天</span>
				<span id="spaToday"style="float: right;">&nbsp</span>
			</div>
			
			<table id="gridUserDetailNoZD" >
				<thead>
					<tr>
						<th data-options="field:'name',width:100">姓名</th>
						<th data-options="field:'birthday',width:100" align="center">出生日期</th>
						<th data-options="field:'household',width:100">户籍</th>
						<th data-options="field:'householdType',width:80,formatter:householdTypeColumn">户籍类型</th>
						<th data-options="field:'marry',width:80,formatter:marryColumn">婚姻状况</th>
						<th data-options="field:'education',width:100,formatter:educationColumn">文化程度</th>
						<th data-options="field:'id',width:60,formatter:optColumn" align="center">诊断</th>
					</tr>
				</thead>
			</table>
			</div>
			</div>

			<div class="userGridDiv " style="width: 29%;float: left;margin-left: 10px;" >
			<div class="easyui-panel" title="总览">
				<div class="patientSynopsis">
				未提交病史患者：<div><a id="countUserDetailNoBS" href="#">-</a></div>
				</div>
				<div class="patientSynopsis">
				未提交检查结果患者：<div><a id="countUserDetailNoFJ" href="#">-</a></div>
				</div>
				<div class="patientSynopsis">
				未给出诊断患者：<div><a id="countUserDetailNoZD" href="#">-</a></div>
				</div>
				<div class="patientSynopsis">
				已给出诊断患者：<div><a id="countUserDetailZDTody" href="#">-</a></div>
				</div>
				<div class="patientSynopsis" style="color: blue;cursor:pointer;" onclick="userObserveNoView()">
				总待填手术记录患者：<div><a id="countUserObserveNo" href="#">-</a></div>
				</div>
			</div>
			</div>
			
			<!-- 待填写临床观察表患者 -->
			<div id="divGridUserObserveNo" class="userGridDiv" style="width: 70%;float: left;display: none;">
				<div class="easyui-panel" title="待填手术记录患者" style="padding: 2px;">
				<table id="gridUserObserveNo" >
					<thead>
						<tr>
							<th data-options="field:'name',width:100">姓名</th>
							<th data-options="field:'birthday',width:100" align="center">出生日期</th>
							<th data-options="field:'household',width:100">户籍</th>
							<th data-options="field:'householdType',width:80,formatter:householdTypeColumn">户籍类型</th>
							<th data-options="field:'marry',width:80,formatter:marryColumn">婚姻状况</th>
							<th data-options="field:'education',width:100,formatter:educationColumn">文化程度</th>
							<th data-options="field:'id',width:100,formatter:optColumnObserve" align="center">填写</th>
						</tr>
					</thead>
				</table>
				</div>
			</div>
			
			</div>
			</div>
			</div>
		</div>
    </div>
    
    
    <!--修改密码窗口-->
    <div id="winEditPwd" class="easyui-window" title="修改密码" collapsible="false" minimizable="false"
        maximizable="false" icon="icon-save"  style="width: 300px; height: 190px; padding: 5px;
        background: #fafafa;" data-options="modal: true, shadow: true, closed: true,resizable:false">
        <div class="easyui-layout" fit="true">
            <div region="center" border="false" style="padding: 10px; background: #fff; border: 1px solid #ccc;">
            <form id="frmEditPwd">
                <table>
                	<tr>
                        <td align="right" >原密码：</td>
                        <td>
                        <input id="txtOldPass" type="Password" name="oldPassword" class="easyui-textbox" data-options="required:true"/>
                        <input id="txtOldPassRSA" type="hidden" name="oldPasswordRSA"/>
                        </td>
                    </tr>
                    <tr>
                        <td align="right" >新密码：</td>
                        <td>
                        	<input id="txtNewPass" type="Password" name="newPassword" class="easyui-textbox" data-options="required:true,validType:['length[6,32]']" />
                        	<input id="txtNewPassRSA" type="hidden" name="newPasswordRSA" /> 
                        </td>
                    </tr>
                    <tr>
                        <td align="right" >确认密码：</td>
                        <td>
                        	<input id="txtRePass" type="Password" name="rePassword" class="easyui-textbox" data-options="required:true,validType:['equalTo[\'#txtNewPass\']']" />
                        </td>
                    </tr>
                </table>
                </form>
            </div>
            <div region="south" border="false" style="text-align:center; height: 30px; line-height: 30px;">
                <a id="btnEp" class="easyui-linkbutton" icon="icon-ok" href="javascript:void(0)" >确定</a> 
                <a id="btnCancel" class="easyui-linkbutton" icon="icon-cancel" href="javascript:void(0)">取消</a>
            </div>
        </div>
    </div>

	<div id="mm" class="easyui-menu" style="width:150px;">
		<div id="tabupdate">刷新</div>
		<div class="menu-sep"></div>
		<div id="close">关闭</div>
		<div id="closeall">全部关闭</div>
		<div id="closeother">除此之外全部关闭</div>
		<div class="menu-sep"></div>
		<div id="closeright">当前页右侧全部关闭</div>
		<div id="closeleft">当前页左侧全部关闭</div>
		<div class="menu-sep"></div>
		<div id="exit">退出</div>
	</div>
	
	
	<!-- 微信聊天窗口-start -->
	<div id="winDialogs" title="联系人" class="easyui-window" style="width:600px;height:400px" data-options="minimizable:false,collapsible:false,closed:true">
		<div class="easyui-layout" style="width:100%;height:100%;">
			<div data-options="region:'east'" style="width:120px;">
					<div id="div_linkmanList"></div>
			</div>
			<div data-options="region:'center'">
				<div id="tabDialogs" class="easyui-tabs" data-options="fit:true"></div>
			</div>
		</div>
	</div>
	<!-- 微信聊天窗口-end -->
	
	<!-- 病史诊断窗口-start -->
	<div id="winQuestionnaireDiagnosis" title="病史诊断" class='easyui-window' data-options='closed:true,collapsible:false,minimizable:false,modal:true,maximizable:false' >
		<div class='easyui-layout' data-options='fit:true'>
			<div data-options="region:'center'" style='padding:2px;'>
				<div id=questionDiagnosisView class='easyui-panel' style='height: 80%;overflow:hidden;' align='center'>
				
				</div>
				<div id="div_diagnosis" style='height: 60px;'>
				<div style="margin-top: 5px;">
				
				<div style="width: 50px;float: left;position: relative;vertical-align: middle;height: 55px;line-height: 55px;">
					诊断：
				</div>
				<form id="frmQuestionnaireDiagnosis">
				<div style="float: left;position: relative;width: 400px;">
					 &nbsp;
					 <input type="hidden" id="questionnaireAnswerId" value="">
					 <input type="hidden" id="id" name="id" value="">
					 G<input id="txtZdg" name="zdg" class="easyui-numberspinner" data-options="min:0,max:9,required:true" style="width: 50px;">
					 P<input id="txtZdp" name="zdp" class="easyui-numberspinner" data-options="min:0,max:9,required:true" style="width: 50px;">
					 <input id="txtZdz" name="zdz" class="easyui-numberspinner" data-options="min:5,max:20,required:true" style="width: 50px;">+
					 <input id="txtZdt" name="zdt" class="easyui-numberspinner" data-options="min:0,max:6,required:true" style="width: 50px;">周
					 <br/>
					 <input id="txtZdHandle_rglc" type="radio" name="zdHandle" value="人工流产"><label for="txtZdHandle_rglc">人工流产</label>
					 <input id="txtZdHandle_ywlc" type="radio" name="zdHandle" value="药物流产/清宫"><label for="txtZdHandle_ywlc">药物流产/清宫</label>
					 <input id="txtZdHandle_ywrs" type="radio" name="zdHandle" value="异位妊娠"><label for="txtZdHandle_ywrs">异位妊娠</label>
					 <input id="txtZdHandle_zy" type="radio" name="zdHandle" value="早孕"><label for="txtZdHandle_zy">早孕</label>
					 <br/>
					 <input id="txtZdHandle_other" type="radio" name="zdHandle" value="">
					 <label for="txtZdHandle_other">
					 <input id="txtZdHandle_other_content" type="text" class="easyui-textbox" name="zdHandle_other" style="width: 280px;" data-options="prompt:'其他'">
					 </label>
				</div>
				</form>
				
				</div>
				</div>
			</div>
			<div data-options="region:'south',border:false" style="text-align:center;padding:5px 5px 5px 0;">
				<div id="div_btn_diagnosis" style="margin-left: 10px;display: inline-block;">
					<a class="easyui-linkbutton" data-options="iconCls:'icon-ok'" href="javascript:void(0)" onclick="javascript:submitDiagnosis()" style="width:80px">提交诊断</a>
				</div>
				<div id="div_btn_edit_answer" style="margin-left: 10px;display: inline-block;">
					<a class="easyui-linkbutton" data-options="iconCls:'icon-edit'" href="javascript:void(0)" onclick="javascript:editAnswer()" style="width:80px">修改病史</a>
				</div>
				<div id="div_btn_edit_answer_do" style="margin-left: 30px;display: none;">
					<a class="easyui-linkbutton" data-options="iconCls:'icon-ok'" href="javascript:void(0)" onclick="javascript:editAnswerDo()" style="width:80px">提交病史</a>
				</div>
			</div>
		</div>
	</div>
	<!-- 病史诊断窗口-end -->
	
	<!-- 服务对象临床观察表填写-start -->
	<div id="winObserve" title="服务对象临床观察表" class='easyui-window' data-options='closed:true,collapsible:false,minimizable:false,modal:true,maximizable:false'>
		<div class='easyui-layout' data-options='fit:true'>
			<div id="winObserveView" class='easyui-panel' style='height: 95%;overflow:hidden;' align='center'>
				
			</div>
			<div data-options="region:'south'" style="text-align:center;padding:5px 5px 5px 0;">
				<a class="easyui-linkbutton" data-options="iconCls:'icon-ok'" href="javascript:void(0)" onclick="javascript:submitObserve()" style="width:80px">提交</a>
			</div>
		</div>
	</div>
	<!-- 服务对象临床观察表填写-end -->
	
	<div class="easyui-draggable" style="width: 40px;height: 40px;z-index: 9999;position: absolute;bottom: 40px;right: 30px;">
		<img id="imgSysHeader" height="35" width="35" alt="header" src="../images/header/system_header.png" style="cursor: pointer;" onclick="winDiaOpen()">
	</div>
</body>
</html>